package com.hyz.reposiroty.controller;

import com.hyz.reposiroty.pojo.Repository;
import com.hyz.reposiroty.service.RepositoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author HGD
 * @date 2022/10/1 10:26
 */
@RestController
@RequestMapping("/asset/repository")
public class RepositoryController {
    @Autowired
    private RepositoryService repositoryService;

    @PostMapping("/getAllRepositories")
    public List<Repository> getAllRepositories() {
        return repositoryService.getAllRepositories();
    }
}
